import { CHANGE_MENU_REDUX } from './actionTypes';
import preloadedState from '../../preloadedState';

const defaultViewport = preloadedState.get('menu');

function reducer(state = defaultViewport, action) {
    const { type, payload } = action;

    switch (type) {
        case CHANGE_MENU_REDUX:
            return payload;
        default:
            return state;
    }
}

export default reducer;
